<template>
  <div class="wft-w-h-100" :style="textStyle">
    <span :ref="attrs.ref" v-on="events">{{ data.data }}</span>
  </div>
</template>
<script>
import useRequestMixin from '../../../mixins/useRequest'
import useEventMixin from '../../../mixins/useEvent'
import useAttrsMixin from '../../../mixins/useAttrs'
export default {
  name: 'basicText',
  mixins: [useRequestMixin, useEventMixin, useAttrsMixin],
  props: {
    curComp: {
      type: Object,
      required: true
    },
    data: {
      type: Object,
      default: () => ({})
    }
  },
  computed: {
    textStyle() {
      const { color, fontWeight, fontStyle, textDecoration, fontSize } = this.attrs
      return {
        color,
        fontWeight,
        fontStyle,
        textDecoration,
        fontSize: fontSize + 'px'
      }
    }
  }
}
</script>
<style scoped>
.wft-w-h-100 {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
